﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fluq
{
	sealed class DependencyObject
	{
		private object _instance;
		private IEnumerable<object> _children;
		private IDependency _dependency;

		public DependencyObject(object instance, IDependency dependency, IEnumerable<object> children)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}

			if (dependency == null)
			{
				throw new ArgumentNullException("dependency");
			}

			if (children == null)
			{
				throw new ArgumentNullException("children");
			}

			_instance = instance;
			_dependency = dependency;
			_children = children;
		}

		public object Instance { get { return _instance;  } }

		public IDependency Dependency { get { return _dependency; } }

		public IEnumerable<object> Children
		{
			get
			{
				return _children;
			}
		}
	}
}
